Kanzi 3.9.10
kanzi::PropertyObject Class Reference

PropertyObject is the base class that supports setting and retrieving of property types. More...

#include <kanzi/core/property/property_object.hpp>

Inheritance diagram for kanzi::PropertyObject:
[legend]

Public Types

typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 

Public Member Functions

template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier without notifying handlers.
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 Returns the begin iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator beginPropertyStorage () const
 Returns the begin iterator to the internal property storage container.
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object.
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object.
 
PropertyStorageContainer::iterator endPropertyStorage ()
 Returns the end iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator endPropertyStorage () const
 Returns the end iterator to the internal property storage container.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property type.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers.
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const
 Gets number of current notification handlers for given property type.
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers.
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property.
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property.
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value.
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Virtual function to handle property change notifications.
 
 PropertyObject ()
 
void removeKzbProperties ()
 Remove all KZB properties.
 
void removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties)
 Remove all KZB properties that are not included in a given set.
 
template<typename DataType >
void removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property.
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property type.
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
KZ_DEPRECATED void validatePropertyModifiers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
void validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
virtual ~PropertyObject ()
 

Protected Member Functions

AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Acquires a local value source entry that is free for the assignment of a value.
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
template<typename DataType >
void addPropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Adds a property modifier entry to the property modifier stack and validates them.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 Internally adds a property value source.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 Internally adds a property value source.
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &otherPropertyStorage)
 Copy local value from property storage.
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the property storage for given property type descriptor.
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByNameAndDataType (string_view name, PropertyDataType dataType) const
 Finds a property type descriptor by name and data type.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByQualifiedNameAndDataType (string_view qualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names.
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the top-level value source for a given property descriptor.
 
virtual void notifyPropertyHandlers (PropertyStoragePtr &storagePtr, PropertyNotificationReason reason)
 Notifies all property handlers on a property storage.
 
void onCopy (const PropertyObject &other)
 
void removeLocalValue (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Removes a local value from the given property storage.
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 Removes a property value source.
 
void validatePropertyModifiers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers without notifying handlers.
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers and notifies handlers.
 

Detailed Description

PropertyObject is the base class that supports setting and retrieving of property types.

See PropertyType, AbstractPropertyType, DynamicPropertyType.

Member Typedef Documentation

◆ PropertyStoragePtr

◆ PropertyStorageContainer

◆ PropertyStorageIterator

typedef PropertyStorageContainer::iterator kanzi::PropertyObject::PropertyStorageIterator

◆ PropertyStorageConstIterator

typedef PropertyStorageContainer::const_iterator kanzi::PropertyObject::PropertyStorageConstIterator

◆ PropertyStorageReverseIterator

typedef PropertyStorageContainer::reverse_iterator kanzi::PropertyObject::PropertyStorageReverseIterator

Constructor & Destructor Documentation

◆ PropertyObject()

kanzi::PropertyObject::PropertyObject ( )
explicit

◆ ~PropertyObject()

virtual kanzi::PropertyObject::~PropertyObject ( )
virtual

Member Function Documentation

◆ setProperty()

template<typename DataType >
void kanzi::PropertyObject::setProperty ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Traits::ParameterType value )
inline

Sets the local value of a property type.

Parameters
propertyTypeThe property type identifying the property to set.
valueThe value to set.

◆ removeKzbProperties() [1/2]

void kanzi::PropertyObject::removeKzbProperties ( flat_set< AbstractPropertyType > * keepProperties)

Remove all KZB properties that are not included in a given set.

Property types marked with KZU_PROPERTY_MANAGER_FLAG_KEEP_DURING_PATCHING are not removed.

Parameters
keepPropertiesSet of properties to keep.

◆ removeKzbProperties() [2/2]

void kanzi::PropertyObject::removeKzbProperties ( )
inline

Remove all KZB properties.

Property types marked with KZU_PROPERTY_MANAGER_FLAG_KEEP_DURING_PATCHING are not removed.

◆ getProperty()

template<typename DataType >
PropertyType< DataType >::Traits::ReturnType kanzi::PropertyObject::getProperty ( const PropertyType< DataType > & propertyType) const
inline

Returns the current value of a property type.

This function returns a value that is the result of the property system evaluating the inputs that can affect the values of properties. It calculates the final value by determining the base value of the property and applying existing modifiers to it.

Base value is affected by the following inputs where the highest entry in the list determines the base value:

  1. Local value set with setProperty or loaded from kzb
  2. Value set by a style affecting the property.
  3. Value defined by class metadata.

When the base value is determined the system applies modifiers to the value that can change the value or replace it completely. The following is the list of possible modifiers, where the order of evaluation is determined by the order the modifiers were added or applied.

  1. Values defined is states of state manager.
  2. Animations.

If no inputs to the property value can be established the system returns the value registered in the property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.

◆ getOptionalProperty()

template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > kanzi::PropertyObject::getOptionalProperty ( const PropertyType< DataType > & propertyType) const
inline

Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value.

If there is no value sources or modifiers, nullopt is returned.

See also
getProperty()
Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns an optional value that is left empty if the property was not found.

◆ getPropertyBase()

template<typename DataType >
PropertyType< DataType >::Traits::ReturnType kanzi::PropertyObject::getPropertyBase ( const PropertyType< DataType > & propertyType) const
inline

Returns the current value of a property disregarding modifiers.

Base value is affected by the following inputs where the highest entry in the list determines the base value:

  1. Local value set with setProperty or loaded from kzb
  2. Value set by a style affecting the property.
  3. Value defined by class metadata.

Modifiers are not applied, the highest-priority base value is returned.

If no inputs to the property value can be established the system returns the value default value from property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.

◆ getOptionalPropertyBase()

template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > kanzi::PropertyObject::getOptionalPropertyBase ( const PropertyType< DataType > & propertyType) const
inline

Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.

If there is no value sources, nullopt is returned.

See also
getPropertyBase()

If no inputs to the property value can be established the system returns the value default value from property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.

◆ setAbstractProperty()

template<typename DataType >
void kanzi::PropertyObject::setAbstractProperty ( AbstractPropertyType abstractPropertyType,
typename PropertyType< DataType >::Traits::ParameterType value )
inline

◆ getAbstractProperty()

template<typename DataType >
PropertyType< DataType >::Traits::ReturnType kanzi::PropertyObject::getAbstractProperty ( AbstractPropertyType abstractPropertyType) const
inline

◆ getAbstractPropertyBase()

template<typename DataType >
PropertyType< DataType >::Traits::ReturnType kanzi::PropertyObject::getAbstractPropertyBase ( AbstractPropertyType abstractPropertyType) const
inline

◆ getOptionalAbstractProperty()

template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > kanzi::PropertyObject::getOptionalAbstractProperty ( AbstractPropertyType abstractPropertyType) const
inline

◆ setPropertyFlag()

void kanzi::PropertyObject::setPropertyFlag ( AbstractPropertyType propertyType,
uint32_t flag )

◆ isPropertyFlagSet()

bool kanzi::PropertyObject::isPropertyFlagSet ( AbstractPropertyType propertyType,
uint32_t flag ) const

◆ clearPropertyFlag()

void kanzi::PropertyObject::clearPropertyFlag ( AbstractPropertyType propertyType,
uint32_t flag )

◆ hasValue()

bool kanzi::PropertyObject::hasValue ( AbstractPropertyType propertyType) const

Evaluates whether there are any inputs into the property value.

Both value sources and modifiers are taken into account.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there are inputs into the property value, false otherwise.

◆ hasBaseValue()

bool kanzi::PropertyObject::hasBaseValue ( AbstractPropertyType propertyType) const

Evaluates whether there are any inputs into the property value, disregarding modifiers.

Does not take modifiers into account.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there are inputs into the property value, false otherwise.

◆ hasLocalValue()

bool kanzi::PropertyObject::hasLocalValue ( AbstractPropertyType propertyType) const

Evaluates whether there is a local value set for the property.

Local values are set with setProperty or loaded from kzb.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there is a local value for the property.

◆ hasNonClassValue()

bool kanzi::PropertyObject::hasNonClassValue ( AbstractPropertyType propertyType) const

Evaluates whether there is a value of any precedence higher than class default value set for the property.

Parameters
propertyTypeThe property type identifying the property to evaluate.
Returns
Returns true if there is a non-class value for the property.

◆ removeLocalValue() [1/2]

void kanzi::PropertyObject::removeLocalValue ( AbstractPropertyType propertyType)

Removes the local value associated with the property.

Parameters
propertyTypeThe property type identifying the property to evaluate.

◆ copyLocalValue() [1/2]

void kanzi::PropertyObject::copyLocalValue ( const PropertyObject & other,
AbstractPropertyType propertyType )

Copies local value of single property from another object.

Parameters
otherThe object from which to copy the value.
propertyTypeProperty type to copy.

◆ copyLocalValues()

void kanzi::PropertyObject::copyLocalValues ( const PropertyObject & other)

Copies all local values from another object.

Parameters
otherThe object from which to copy the values.

◆ onPropertyChanged()

◆ addPropertyValueSource() [1/4]

template<typename DataType >
void kanzi::PropertyObject::addPropertyValueSource ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource * valueSource,
PropertyValuePrecedence precedence,
void * ownerPointer )
inline

◆ addPropertyValueSource() [2/4]

template<typename DataType >
void kanzi::PropertyObject::addPropertyValueSource ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource * valueSource,
PropertyValuePrecedence precedence,
AbstractPropertyTypeDescriptor::ValueSourceOwner * owner )
inline

◆ removePropertyValueSource() [1/2]

template<typename DataType >
void kanzi::PropertyObject::removePropertyValueSource ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource * valueSource,
void * ownerPointer )
inline

◆ removeLocalPropertyValueSource()

template<typename DataType >
void kanzi::PropertyObject::removeLocalPropertyValueSource ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::TypedValueSource * valueSource,
void * ownerPointer )
inline

◆ addPropertyModifier()

template<typename DataType >
void kanzi::PropertyObject::addPropertyModifier ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback callback,
void * owner )
inline

◆ addPropertyModifierWithoutNotifyingHandlers()

template<typename DataType >
void kanzi::PropertyObject::addPropertyModifierWithoutNotifyingHandlers ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback callback,
void * owner )
inline

Adds a property modifier without notifying handlers.

Use this function only when you want to omit the notification. For example, omit the notification when you add a modifier that is not connected.

Parameters
propertyTypeProperty type to add.
callbackModifier callback to install.
ownerOwner of the modifier.
Since
Kanzi 3.9.7

◆ removePropertyModifier()

template<typename DataType >
void kanzi::PropertyObject::removePropertyModifier ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback callback,
void * owner )
inline

◆ validatePropertyModifiers() [1/2]

KZ_DEPRECATED void kanzi::PropertyObject::validatePropertyModifiers ( AbstractPropertyType propertyType)

Validates property modifiers and notifies handlers.

Parameters
propertyTypeProperty type to validate.
Deprecated
In Kanzi 3.9.7. Use validatePropertyModifiersAndNotifyHandlers() instead.

◆ addPropertyNotificationHandler()

template<typename DataType >
void kanzi::PropertyObject::addPropertyNotificationHandler ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::NotificationCallback callback,
void * owner )
inline

◆ removePropertyNotificationHandler()

template<typename DataType >
void kanzi::PropertyObject::removePropertyNotificationHandler ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::NotificationCallback callback,
void * owner )
inline

◆ getPropertyNotificationHandlerCount()

template<typename DataType >
size_t kanzi::PropertyObject::getPropertyNotificationHandlerCount ( const PropertyType< DataType > & propertyType) const
inline

Gets number of current notification handlers for given property type.

◆ beginPropertyStorage() [1/2]

PropertyStorageContainer::iterator kanzi::PropertyObject::beginPropertyStorage ( )
inline

Returns the begin iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the beginning of property storage.

◆ beginPropertyStorage() [2/2]

PropertyStorageContainer::const_iterator kanzi::PropertyObject::beginPropertyStorage ( ) const
inline

Returns the begin iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the beginning of property storage.

◆ endPropertyStorage() [1/2]

PropertyStorageContainer::iterator kanzi::PropertyObject::endPropertyStorage ( )
inline

Returns the end iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the end of property storage.

◆ endPropertyStorage() [2/2]

PropertyStorageContainer::const_iterator kanzi::PropertyObject::endPropertyStorage ( ) const
inline

Returns the end iterator to the internal property storage container.

This function is for internal use.

Returns
Iterator to the end of property storage.

◆ validatePropertyModifiersAndNotifyHandlers() [1/2]

void kanzi::PropertyObject::validatePropertyModifiersAndNotifyHandlers ( AbstractPropertyType propertyType)

Validates property modifiers and notifies handlers.

Parameters
propertyTypeProperty type to validate.
Since
Kanzi 3.9.7

◆ addPropertyModifierBase()

template<typename DataType >
void kanzi::PropertyObject::addPropertyModifierBase ( const PropertyType< DataType > & propertyType,
typename PropertyType< DataType >::Descriptor::ModifierCallback callback,
void * owner,
bool notify )
inlineprotected

Adds a property modifier entry to the property modifier stack and validates them.

Parameters
propertyTypeProperty type to add.
callbackModifier callback to install.
ownerOwner of the modifier.
notifyTo notify property handlers, set to true. To omit notification, set to false.
Since
Kanzi 3.9.7

◆ addPropertyValueSource() [3/4]

void kanzi::PropertyObject::addPropertyValueSource ( AbstractPropertyTypeDescriptor & descriptor,
AbstractPropertyTypeDescriptor::ValueSource * valueSource,
PropertyValuePrecedence precedence,
void * ownerPointer )
protected

Internally adds a property value source.

Parameters
descriptorProperty type descriptor.
valueSourceValue source to add.
precedencePrecedence of the value source.
ownerPointerRaw pointer to owner for the value source. Can be 0.

◆ addPropertyValueSource() [4/4]

void kanzi::PropertyObject::addPropertyValueSource ( AbstractPropertyTypeDescriptor & descriptor,
AbstractPropertyTypeDescriptor::ValueSource * valueSource,
PropertyValuePrecedence precedence,
AbstractPropertyTypeDescriptor::ValueSourceOwner * owner )
protected

Internally adds a property value source.

Parameters
descriptorProperty type descriptor.
valueSourceValue source to add.
precedencePrecedence of the value source.
ownerValue source owner.

◆ removeLocalValue() [2/2]

void kanzi::PropertyObject::removeLocalValue ( AbstractPropertyTypeDescriptor & descriptor,
PropertyStoragePtr & propertyStorage )
protected

Removes a local value from the given property storage.

Called internally by other functions.

Parameters
descriptorDescriptor owning the property storage.
propertyStorageProperty storage to remove value from.

◆ removePropertyValueSource() [2/2]

void kanzi::PropertyObject::removePropertyValueSource ( AbstractPropertyTypeDescriptor & descriptor,
AbstractPropertyTypeDescriptor::ValueSource * valueSource,
void * owner )
protected

Removes a property value source.

Parameters
descriptorDescriptor to remove from.
valueSourceValue source installed.
ownerValue source owner pointer.

◆ getTopValueSource()

AbstractPropertyTypeDescriptor::ValueSource * kanzi::PropertyObject::getTopValueSource ( AbstractPropertyTypeDescriptor & descriptor) const
protected

Gets the top-level value source for a given property descriptor.

The top-level value source is the last value source before property modifiers.

Parameters
descriptorProperty descriptor.
Returns
Top-level value source.

◆ getFinalValueSource()

AbstractPropertyTypeDescriptor::ValueSource * kanzi::PropertyObject::getFinalValueSource ( AbstractPropertyTypeDescriptor & descriptor) const
protected

◆ getNonClassValueSource()

AbstractPropertyTypeDescriptor::ValueSource * kanzi::PropertyObject::getNonClassValueSource ( AbstractPropertyTypeDescriptor & descriptor) const
protected

◆ getClassValueSource()

AbstractPropertyTypeDescriptor::ValueSource * kanzi::PropertyObject::getClassValueSource ( AbstractPropertyTypeDescriptor & descriptor) const
protected

◆ constructLocalValueSourceEntry()

AbstractPropertyTypeDescriptor::ValueSourceEntry * kanzi::PropertyObject::constructLocalValueSourceEntry ( AbstractPropertyTypeDescriptor & descriptor,
AbstractPropertyTypeDescriptor::PropertyStorage & propertyStorage )
protected

◆ acquireLocalValueSourceEntry()

AbstractPropertyTypeDescriptor::ValueSourceEntry * kanzi::PropertyObject::acquireLocalValueSourceEntry ( AbstractPropertyTypeDescriptor & descriptor,
PropertyStoragePtr & propertyStorage )
protected

Acquires a local value source entry that is free for the assignment of a value.

Value source entries with an owner may not allow the value source to be reused for assignment. In this case, an existing value source is deleted. If no applicable local value source entry is available, a new entry is constructed.

Parameters
descriptorProperty type descriptor.
propertyStorageProperty storage from which to acquire the entry.
Returns
Reusable value source entry or a newly created one if a reusable entry was not available.

◆ findPropertyStorage()

AbstractPropertyTypeDescriptor::PropertyStorage * kanzi::PropertyObject::findPropertyStorage ( AbstractPropertyTypeDescriptor & descriptor) const
protected

Gets the property storage for given property type descriptor.

This function is for internal use.

Parameters
descriptorProperty type descriptor.
Returns
Pointer to property storage or nullptr.

◆ findPropertyStoragePtr()

PropertyStoragePtr kanzi::PropertyObject::findPropertyStoragePtr ( AbstractPropertyTypeDescriptor & descriptor) const
protected

Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation.

Parameters
descriptorDescriptor to look with.
Returns
Intrusive pointer to property storage.

◆ constructPropertyStorage()

PropertyStoragePtr kanzi::PropertyObject::constructPropertyStorage ( AbstractPropertyTypeDescriptor & descriptor)
protected

◆ acquirePropertyStorage()

PropertyStoragePtr kanzi::PropertyObject::acquirePropertyStorage ( AbstractPropertyTypeDescriptor & descriptor)
protected

◆ acquireModifierStorage()

AbstractPropertyTypeDescriptor::ModifierStorage * kanzi::PropertyObject::acquireModifierStorage ( AbstractPropertyTypeDescriptor & descriptor,
AbstractPropertyTypeDescriptor::PropertyStorage & propertyStorage )
protected

◆ findModifierStorage()

AbstractPropertyTypeDescriptor::ModifierStorage * kanzi::PropertyObject::findModifierStorage ( AbstractPropertyTypeDescriptor & descriptor)
protected

◆ acquireNotificationStorage()

AbstractPropertyTypeDescriptor::NotificationStorage * kanzi::PropertyObject::acquireNotificationStorage ( AbstractPropertyTypeDescriptor & descriptor)
protected

◆ findNotificationStorage()

AbstractPropertyTypeDescriptor::NotificationStorage * kanzi::PropertyObject::findNotificationStorage ( AbstractPropertyTypeDescriptor & descriptor) const
protected

◆ findPropertyTypeDescriptorByNameAndDataType()

AbstractPropertyTypeDescriptor * kanzi::PropertyObject::findPropertyTypeDescriptorByNameAndDataType ( string_view name,
PropertyDataType dataType ) const
protected

Finds a property type descriptor by name and data type.

The property type descriptor must exist in the property object. The name may be either an unqualified name or a full name.

Parameters
nameName to match.
dataTypeData type to match.
Returns
Descriptor if found.

◆ findPropertyTypeDescriptorByQualifiedNameAndDataType()

AbstractPropertyTypeDescriptor * kanzi::PropertyObject::findPropertyTypeDescriptorByQualifiedNameAndDataType ( string_view qualifiedName,
PropertyDataType dataType ) const
protected

Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names.

Parameters
qualifiedNameQualified name to match.
dataTypeData type to match.
Returns
Descriptor if found.

◆ findPropertyTypeDescriptorByUnqualifiedNameAndDataType()

AbstractPropertyTypeDescriptor * kanzi::PropertyObject::findPropertyTypeDescriptorByUnqualifiedNameAndDataType ( string_view unqualifiedName,
PropertyDataType dataType ) const
protected

Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names.

Parameters
unqualifiedNameUnqualified name to match.
dataTypeData type to match.
Returns
Descriptor if found.

◆ validatePropertyModifiersAndNotifyHandlers() [2/2]

void kanzi::PropertyObject::validatePropertyModifiersAndNotifyHandlers ( PropertyStoragePtr & propertyStorage)
protected

Validates property modifiers and notifies handlers.

Internally calls validatePropertyModifiers().

Parameters
propertyStoragePointer to the property storage that contains the modifiers.

◆ validatePropertyModifiers() [2/2]

void kanzi::PropertyObject::validatePropertyModifiers ( PropertyStoragePtr & propertyStorage)
protected

Validates property modifiers without notifying handlers.

Used internally by Kanzi to validate the property modifier stack.

Parameters
propertyStoragePointer to the property storage that contains the modifiers.
Since
Kanzi 3.9.7

◆ copyLocalValue() [2/2]

void kanzi::PropertyObject::copyLocalValue ( const AbstractPropertyTypeDescriptor::PropertyStorage & otherPropertyStorage)
protected

Copy local value from property storage.

Parameters
otherPropertyStorageProperty storage from which to copy.

◆ notifyPropertyHandlers()

virtual void kanzi::PropertyObject::notifyPropertyHandlers ( PropertyStoragePtr & storagePtr,
PropertyNotificationReason reason )
protectedvirtual

Notifies all property handlers on a property storage.

Hold a reference to the property storage before you call this function. The notification handlers can otherwise cause the storage to become invalid.

Parameters
storagePtrPointer to the property storage.
reasonReason for the notification.

Reimplemented in kanzi::Node.

◆ onCopy()

void kanzi::PropertyObject::onCopy ( const PropertyObject & other)
protected

The documentation for this class was generated from the following file: